Sequelize 的 createdAt 時間不對


Posted by Rich on 2021-09-15


createdAt 的時間不是真實新增資料的時間。
原因:sequelize 存取的時間是按照 UTC 標準時間,所以我們需要調整一下時區。

在 config 下面的 config.json 裡面新增一行 timezone: "+08:00" 就可以解決。但如果你跟我是不一樣的時區就要再調整囉~










Related Posts

菜比八寫後端(5) - TypeORM簡介

菜比八寫後端(5) - TypeORM簡介

不要問我從哪裡來 - noopener & noreferrer & nofollow

不要問我從哪裡來 - noopener & noreferrer & nofollow

用 tkinter 實現選擇路徑打開 excel ,並用 tree view 顯示

用 tkinter 實現選擇路徑打開 excel ,並用 tree view 顯示


Comments